﻿using ResourceManager;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Threading;

namespace ResourceTest
{
    class Program
    {
        static Service serv = new Service();

        static void Main(string[] args)
        {
            serv.LoadResourceCompleted += Test;

     //       serv.InitResourceAsync();
            serv.LoadResourceAsync("QQMusic_Setup_90_900.exe", null);

            Thread.Sleep(2000);
        //    serv.CancelAsync();

            System.Console.Read();
        }

        public static void Test(object o, LoadResourceCompletedEventArgs r)
        {
            System.Console.WriteLine(r.UserState);
        }
    }
}
